tmem: reorg the shared pool allocate path
authorBob Liu <lliubbo@gmail.com>
Tue, 28 Jan 2014 04:28:32 +0000 (12:28 +0800)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 9 Apr 2014 13:18:09 +0000 (09:18 -0400)
commita36590e1b5040838af19d2ca712a516f07a6062b
tree14c154cf4f25029192dd1c5d7952c432057a2c4b
parentddaec70bec987969b3a8d4ee6c940fa22a2165e6
tmem: reorg the shared pool allocate path

Reorg the code to make it more readable.
Check the return value of shared_pool_join() and drop a unneeded call to
it. Disable creating a shared & persistant pool in an advance place.

Note that one might be tempted to delay the creation of the pool even
further in the code. That however would break the behavior of the code
- that is if we ended up creating a shared pool and the
'uuid_lo == -1L && uuid_hi == -1L' logic stands  we still need to
create a pool - just not shared type.

Signed-off-by: Bob Liu <bob.liu@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
xen/common/tmem.c